1. Field of the Invention
The present invention relates to image compression. More particularly, the present invention relates to an apparatus and method for optimally compressing image data containing pictorial and text images.
2. Description of the Related Art
Conventional scanners provide digital data representing images from black/white and color documents, for example. Such digital data is then stored in memory; this digital data may be gray (e.g., 8 bits/pixel for black/white data or 24 bits/pixel for color data) or binary. Because considerable memory may be required to store such data, data encoders are often used to compress the data before it is stored, thereby conserving valuable memory. The compressed data is subsequently decompressed to produce the scanned image.
Although numerous different encoding schemes are available, each has deficiencies in encoding image data. Encoding schemes which use gray data as input can be set-up to be "lossy," (e.g., having high compression ratios), resulting in some image degradation due to data loss. That is, gray image data compressed and decompressed using lossy encoding schemes cannot be fully recovered; while these gray data encoding schemes work reasonably well for continuous tone image data, typically containing low contrast images, they are not effective for text/line graphic gray image data, typically containing high contrast images. Similarly, encoding schemes which use binary data as input and are set up to be "lossless," are effective for text/line graphics image data but are poor for halftone image data.
Also, different encoding schemes may be desirable in compressing different image data types, such as pictorial (continuous tone or halftone) or text. However, once a data encoder employing a particular encoding scheme is selected, the data encoder encodes the image data without regard for the image data type. Because documents may contain both pictorial (continuous tone or halftone) and text (character and line graphics) images, compressing image data representing a scanned document using a single encoding scheme may provide undesirable results. Thus, it is also desirable to optimally compress image data according to the different image data types.